package com.computercourse.api.course;

import com.computercourse.framework.domain.course.*;
import com.computercourse.framework.domain.course.ext.CourseInfo;
import com.computercourse.framework.domain.course.ext.CourseView;
import com.computercourse.framework.domain.course.ext.TeachplanNode;
import com.computercourse.framework.domain.course.request.CourseListRequest;
import com.computercourse.framework.domain.course.response.AddCourseResult;
import com.computercourse.framework.domain.course.response.CoursePublishResult;
import com.computercourse.framework.model.response.QueryResponseResult;
import com.computercourse.framework.model.response.QueryResult;
import com.computercourse.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/** 
 * @description 
 * @author Feng.Yuan
 * @date 2020/1/28 10:57 下午
 * @return
 */
@Api(value="课程管理接口",description = "课程管理接口，提供课程的增、删、改、查")
 public interface CourseControllerApi {

    @ApiOperation("课程计划查询")
     TeachplanNode findTeachplanList(String courseId);

    @ApiOperation("添加课程计划")
     ResponseResult addTeachplan(Teachplan teachplan);

    @ApiOperation("添加课程图片")
     ResponseResult addCoursePic(String courseId,String pic);

    @ApiOperation("查询课程图片")
     CoursePic findCoursePic(String courseId);

    @ApiOperation("删除课程图片")
     ResponseResult deleteCoursePic(String courseId);

    @ApiOperation("课程视图查询")
     CourseView courseview(String id);

    @ApiOperation("课程预览")
     CoursePublishResult preview(String id);

    @ApiOperation("课程发布")
     CoursePublishResult publish(String id);

    @ApiOperation("保存课程计划与媒资文件关联")
     ResponseResult saveMedia(TeachplanMedia teachplanMedia);

    //课程查询
    @ApiOperation("课程查询")
     QueryResponseResult<CourseInfo> findCourseList(int page,
                                                          int size,
                                                          CourseListRequest courseListRequest);

    @ApiOperation("获取课程基础信息")
     CourseBase getCourseBaseById(String courseId) throws RuntimeException;

    @ApiOperation("更新课程基础信息")
     ResponseResult updateCourseBase(String id,CourseBase courseBase);

    @ApiOperation("获取课程营销信息")
    CourseMarket getCourseMarketById(String courseId);

    @ApiOperation("获取基础课程")
    List<CourseBase> getBaseCourseByCourseIds(List<String> courseIds);
    @ApiOperation("更新课程营销信息")
    ResponseResult updateCourseMarket(String id, CourseMarket courseMarket);

    @ApiOperation("新增课程")
    AddCourseResult addCourseBase(@RequestBody CourseBase courseBase);



}
